package com.wx.service.impl;

import com.wx.dao.ProductDao;
import com.wx.model.CaseTypeModel;
import com.wx.model.PageModel;
import com.wx.model.ProductModel;
import com.wx.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IProductServiceImpl implements IProductService {
    @Autowired
    ProductDao productDao;

    @Override
    public List<ProductModel> pageAndFindAll(PageModel pageModel) {
        return productDao.pageAndFindAll(pageModel);
    }

    @Override
    public int getCont(PageModel pageModel) {
        return productDao.getCont(pageModel);
    }

    @Override
    public List<ProductModel> conditionFindAll(ProductModel productModel) {
        return productDao.conditionFindAll(productModel);
    }

    @Override
    public int getConditionFindAllCont(ProductModel productModel) {
        return productDao.getConditionFindAllCont(productModel);
    }

    @Override
    public List<CaseTypeModel> casetypeFindAll() {
        return productDao.casetypeFindAll();
    }

    @Override
    public int productAdd(ProductModel productModel) {
        return productDao.productAdd(productModel);
    }

    @Override
    public ProductModel findById(ProductModel productModel) {
        return productDao.findById(productModel);
    }

    @Override
    public int productUpdate(ProductModel productModel) {
        return productDao.productUpdate(productModel);
    }

    @Override
    public int producatDeleteById(ProductModel productModel) {
        return productDao.producatDeleteById(productModel);
    }

    @Override
    public List<ProductModel> productFindAll() {
        return productDao.productFindAll();
    }
}
